export ANDROID_NDK=/home/jinchengsong/Desktop/android-ndk-r26d
rm -rf build

MYDIR=$(dirname "$(readlink -f "$0")")

echo $MYDIR

cmake  -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
       -DANDROID_ABI="armeabi-v7a" \
       -DANDROID_NDK=$ANDROID_NDK \
       -DANDROID_PLATFORM=android-22 \
       -Bbuild -H. \
       -DPAHO_ENABLE_TESTING=OFF \
       -DPAHO_BUILD_STATIC=ON -DPAHO_WITH_SSL=OFF -DPAHO_HIGH_PERFORMANCE=ON \
       -DCMAKE_INSTALL_PREFIX=$MYDIR/build

cmake --build $MYDIR/build --verbose --target install
